package com.lemurian.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.Type;

import com.lemurian.entity.utils.DefaultPersistence;

@Entity
@Table(name="tb_tax")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@BatchSize(size=1000)
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Tax extends DefaultPersistence implements Serializable {

	private static final long serialVersionUID = 1L;

	private BigDecimal nominalSSB;
	private BigDecimal nominalSSP;
	private Date paymentDate;
	private Boolean paymentStatus;
	private Boolean paymentTaxStatus;
	
	@ManyToOne
	@JoinColumn(name="client_id")
	private Client client;
	
	public Client getClient() {
		return client;
	}
	
	public void setClient(Client client) {
		this.client = client;
	}

	@Column(name="nominalSSB", precision=12)
	public BigDecimal getNominalSSB() {
		return nominalSSB;
	}

	public void setNominalSSB(BigDecimal nominalSSB) {
		this.nominalSSB = nominalSSB;
	}

	@Column(name="nominalSSP", precision=12)
	public BigDecimal getNominalSSP() {
		return nominalSSP;
	}

	public void setNominalSSP(BigDecimal nominalSSP) {
		this.nominalSSP = nominalSSP;
	}

	@Temporal(TemporalType.DATE)
	public Date getPaymentDate() {
		return paymentDate;
	}

	public void setPaymentDate(Date paymentDate) {
		this.paymentDate = paymentDate;
	}

	@Column(length=1,name="payment_status", nullable=true)
	@Type(type="true_false")
	public Boolean getPaymentStatus() {
		return paymentStatus;
	}

	public void setPaymentStatus(Boolean paymentStatus) {
		this.paymentStatus = paymentStatus;
	}

	@Column(length=1,name="payment_tax_status", nullable=true)
	@Type(type="true_false")
	public Boolean getPaymentTaxStatus() {
		return paymentTaxStatus;
	}

	public void setPaymentTaxStatus(Boolean paymentTaxStatus) {
		this.paymentTaxStatus = paymentTaxStatus;
	}
	
}
